CC=gcc
CFLAGS=-Wall -g

posix: server.c client.c head.h
	$(CC) $(CFLAGS) -DPOSIX -o server.o server.c -lrt
	$(CC) $(CFLAGS) -DPOSIX -o client.o client.c -lrt

systemv: server.c client.c head.h
	$(CC) $(CFLAGS) -DSYSTEMV -o server.o server.c
	$(CC) $(CFLAGS) -DSYSTEMV -o client.o client.c
	
posix_signal: server.c client.c head.h
	$(CC) $(CFLAGS) -DPOSIX_SIGNAL -o server.o server.c -lrt
	$(CC) $(CFLAGS) -DPOSIX_SIGNAL -o client.o client.c -lrt

clean:
	rm -f *.o *~ result.txt

.PHONY: posix systemv posix_signal clean
